import 'package:aio/aio.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:app/generated/app_strings.dart';
import 'package:app/src/http/bean/wroks/contract_bean.dart';
import 'package:app/src/http/bean/wroks/customers_copyInfo.dart';
import 'package:app/src/ui/app_ui.dart';
import 'package:app/src/ui/route/works/public/items/ui_base.dart';
import 'package:app/src/ui/route/works/public/items/ui_card.dart';
import 'package:app/src/utils/image_path_utils.dart';

import '../../../../../http/bean/works_2023/commission_bean.dart';

///提成审核信息
class UiPercentageCheck {
  ///data 客户信息
  ///oldData 历史客户信息
  static Widget build(BuildContext context, PercentageCheckBean? data,
      PercentageCheckBean? oldData) {
    if (StringUtils.isEmpty(data)) {
      return AppUi.getEmptyView();
    }
    List<Widget> children = [];
    children
        .add(UiBase.title(context, AppStrings.of(context).BaseInfo)); //标题：基本信息
    children.add(UiBase.item(context, AppStrings.of(context).beginDatetime_,
        data?.beginDatetime, oldData?.beginDatetime)); //开始日期
    children.add(UiBase.item(context, AppStrings.of(context).endDatetime_,
        data?.endDatetime, oldData?.endDatetime)); //截止日期
    children.add(UiBase.item(context, AppStrings.of(context).manType_,
        data?.manType, oldData?.manType)); //人员类型
    children.add(UiBase.item(context, AppStrings.of(context).payType_,
        data?.payType, oldData?.payType)); //提成类型
    var column = UiBase.column(context, children);
    var card = UiCard.build(context, column);
    return card;
  }
}
